added print errors global to stop printing errors