open STDERR,'> logfile' or die "Can't write to logfile: $!\n";