Create Sub for wave header reading