* Add format specific query
* Fix header encoding/validation
* Add logging