clean up file handle