fix handling of JSON files
1.0.1