Fix some bugs, handle RENAME-FILE