Removed use of err() for Windows compatibility.