fix bugs that can't load JSON file from local file system