use new Json API for reading files in register script