fix a bug about creating reboot.txt in wrong position