#5: added an optional callback to vhost manager