fix typo in write_connection_file