Add ability to store attributes of binary files:

* endianness
* compression

Fix endianness bug
Add schema writing error logging