added optional argument to load_json_file (to specify unit number)