Implemented FileIO save functionality with tests