writes binary catalog to file