Fix logging of errors, Karma expects a string. Reset errors after every cycle.