Close file handle when done