Updated how console log is accessed from main thread.