print errors when they occur