introducing wavedumps and fixing some issues with the script