migrated fileprocessor to fopen instead of fstream