Close 'coords_file' after writing to it