stream to file and stream to cout implemented
append ctime to datafile names