open STDERR, ">errors.log" or warn "failed to reopen STDERR: $!\n";