disk image generation modularized