Set the application_id to avoid more than one instance of the app. Fix logging.