clean up log and change createGainNode to createGain