Reduce size of file.cpp