refactored _printError

it doesn't rely on jQuery, and it doesn't create any new html elements