use resource path, throw error if json file not found