handled exit of application and modified 

catching empty destination