fix error handling

Now missing .bat file results in exception.
more tests

+ compile-time usage tests
+ wrong usage tests