delete img dir can cause errors