handling delete file with code already added with dialog window