Thread-safety patch for Printer

This solves the incomplete output problem by adding thread-safety locking to a Printer.