Tightened up error reporting

* -debug= arg now lets you specify debug level from cmd line
* reprioritized some calls.