Fixed bug in -show-config and -show-runconfig and added json output