Bug fix to fileio.cpp in lab 10