improved smart-attach-daemon