Added exception handling in comments