Tweak tutorial to correctly close the file before checking line count.