added message box and added file recovory