fix in writing to delay.txt