Changed file exist check to node exist check when creating new node