fix config-backup directory creation and create better global variables