Get the filePath in callback to work

While implementing this today I found a bug where the app wouldn't compile since I tries to set a key and a value on a `JSONArray`. Instead, `JSONObject` needs to be used. I've hotfixed my local plugin but I'm submitting this patch to your repo as well so you can take it in if you want.