close file object after json.dump
add sample data and script to generate it