code structural changes

debug is global
cron fix
use load_dict_from_file and atomic_json_dump