Log the exception for easy debugging