Close file handles after use