print errors if any occur