Added onfinished callback; close #7