print errors if they occur