Dynamic filename in awk

Hi

The following code seems to work, but why am i getting an error message?

cscyabl@comet:(develop)> awk 'BEGIN {FS="|"}{print $2 >> $1}' test.sum    
awk: A print or getline function must have a file name.
 The input line number is 8. The file is test.sum.
 The source line number is 1.

Cheers

I think $1 might be a null string.

Right, thanks anbu23, there was such a blank line in my file. Wasn't obvious since the file is really big... Cheers