Changed JSON file i/o from async to sync