Check if json is valid when loading permissions file.
Made the 15 line policy less strict
Retry when we get an error, don't just blindly continue hoping it's solved ;)