Recently, a student of mine had a problem: in his program, he was creating a file. Later in the program, he was reading the file - but he did not close its file handle, which resulted in the file not being complete. The program thus returned wrong results.