changed how logging is called

Logging is broken in debug ATM; severe errors will be printed to screen