The program has two functions:
- Reading text from a file
- Writing text to a file
When reading text from a file, the program should handle the following exceptions:
- If the file does not exist, display an error message and prompt the user to enter the name of an existing file.
- If the file cannot be read (e.g., due to lack of permissions), display an error message.
When writing text to a file, the program should also handle exceptions:
- If the file cannot be created or overwritten, display an error message.
- If an error occurs during writing, such as insufficient disk space, handle this error.
Implement a menu that allows the user to choose whether to read text from a file, write text to a file, or exit the program.