catching exception for debugging