deletes file before recalculating image so that pixels from previous calculation are not left over