Fix LogContext.write() method