Refactor vm filename generation using tap.