Log the exception