Fixed issue with file removal