Corrected issues with file output missing name information and some C++ code bugs.