I've figured out that the nc parameter -q works more appropriate then -w. Futhermore I've set the argument for this parameter to 2.