Add a config variable and loop to decide status