better error reporting, added backtrace print