Add error checking for newwin.