Fixing removal of records and files