Syntaxupdate

* Update to new api syntax
* Fail gracefully on empty input file