added removeNode method for files