move generator callback actions to lib/generate folder