Adding clause to only run actions if the configuraiton is valid