Add file IO to main.cpp