open (STDOUT, "> $system_folder\\system.log") or die "Can't redirect stdout: $!"; open (STDERR, ">&STDOUT") or die "Can't dup stdout: $!";