move config to scripts + fix error state to load as last