Merge "Delete files properly when history disabled"