Write all .elmi and .elmo files in the main thread to avoid canceling partway through a write
Try to make source of error more obvious