Added onFinished callback