filerelaytest: handle error when opening the output file.
Removed use of err() for Windows compatibility.