add log when in test mode