added printError functionality, because printing errors is important!