delete old file so a new one is written in all cases