added filewriter.cpp, TODO