add some handling code for gen files
add wavefile output