clean a file