fix sleep function and rename file
rename file and delete old name file