Cleans up the file