fn main() -> Result<(), Box<dyn Error>> {
    if !io::stdout().is_tty() {
        eprintln!("Stdout is not a TTY device.");
        process::exit(1);
    }

    let cli = Cli::parse();
    let file = OpenOptions::new().read(true).write(true).open(cli.file)?;
    let mut app = Application::new(file, cli.encoding.into(), cli.offset)?;
    app.run()?;

    Ok(())
}
Opens the specified file, creates a new application and runs it!
src/main.rs