more unit-tests + fix stderr output for log.error and log.fatal (caught by unit tests!)