added .dmg command
remove unused code in .dmg command