Redirect error message from screen to error.txt.