printerwriteops refactored