use os.rename instead of read-write-delete file