Add finish callback and make it work with co