Add callback to `.end()` method