file read cleanup