change erase to os.remove