Added function to make sure json loads before generator runs.