open( TMP, ">textfile" ) or print STDERR "[$0] Could not open file! $!";