added printer error handling