Failsafe avoid logging when in test mode

@ikeough TBR - Need to add a failsafe to ensure that we don't log from test mode