Added onComplete parameter to the config