Added exception handling
add custom exception handler