IT, Transportation, Civil and Environmental Engineering Systems
Re-open a fstream may fail... call clear() between close() and open()!
http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#4_4_iostreamclear