Adds thread-safe stdout