Inserting data into a file
Misleading Message?

    if (args.length != 1) {
        System.err.println(&quot;No arguments provided.&quot;);
        System.exit(1);
    }


So if I have 2 arguments, I get the message No arguments provided. Umm... I provided 2 arguments!
Suggested fix:
Change the above code to:
    if (args.length == 0) {
        System.err.println(&quot;No arguments provided.&quot;);
        System.exit(1);
    }

And you can possible warn the user about only requiring one argument if they provide too much. Something like:
    if (args.length &gt; 1) {
        System.out.println(&quot;Warning! Too many arguments; only the first one will be considered.&quot;);
    }