towards thread-safe logging