open WARN, '> warnings.txt' or die ("Cannot write warnings.txt: $!"); *STDERR = *WARN;