Fixed a bug with deletion file