writing to file error:   crosses initialization of ‘std::ofstream videofile’
-fixed