check error in normalize by median

You'll need `print >> filehandle, contents`  here