revised error message for file open failure
windows terminal supports the toggle command
simplify code for toggle command
windows terminal supports the toggle command