#105 better logging of errors