Create activityHandler.logger in main thread to avoid race condition