build cleanup and thread-safe logging documentation