Check the return value of fclose when updating the nodes file