broken main.cpp (filesave)