Added file IO and test