Improved deleting of files