Made the -R flag just truncate the file instead of reading it and then deleting each node.