import java.io.*;

public class App {

    public static void main(String[] args) {
        try {
            readFile("test.txt");
        } catch (FileNotFoundException e) {
            System.err.println("Error: The file was not found. Please check the file path.");
        } catch (IOException e) {
            System.err.println("Error: An I/O error occurred while reading the file.");
        } catch (Exception e) {
            System.err.println("An unexpected error occurred: " + e.getMessage());
        }
    }

    private static void readFile(String fileName) throws IOException {
        FileReader f = new FileReader(fileName);
        try {
            int c;
            while ((c = f.read()) != -1) {
                System.out.print((char) c);
            }
        } finally {
            f.close();
        }
    }
}
