error on import
move out definitions of printabl configs to header

and merge for json and legacy
add scope for fixed output
don't try to create the json if we don't have a config
only look at mode if p->mode is set
move around the legacy export config

let the ykp_write_config() call ykp_legacy_export_config(), and call
the write function in that place only.