Exception handling implemented for save dialog