Fixed issue with removing file