Clean up file handles