finished adding file IO, now prints json file, json output not tested yet