add synchronized for getPrinter() method