Issue throwing two separate FileNotFoundExceptions Java
<p>I need two separate exceptions, one thrown if the .pro file is missing, the other if the missing file is a .cmd, that current set up has both exceptions being thrown if either one is missing. What am I doing wrong here? </p>

<pre><code>import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Scanner;

import javax.xml.ws.Holder;

public class Inventory {

    static String FileSeparator = System.getProperty("file.separator");

    public static void main(String[] args) {
        String path = args[0];
        String name = args[1];
        ArrayList&lt;Holder&gt; because = new ArrayList&lt;Holder&gt;();

        try {
            File product = new File(path + name + ".pro");
            Scanner scan = new Scanner(product);
            while (scan.hasNext()) {
                System.out.print(scan.next());
            }
            scan.close();
        } catch (FileNotFoundException e) {
            System.out.println("Usage: java Inventory &lt;path&gt; &lt;filename&gt;");
            System.out.println("The products file \"" + name + ".pro\" does not exist.");
        }

        try {
            File command = new File(path + name + ".cmd");
            Scanner scan = new Scanner(command);

            while (scan.hasNext()) {
                System.out.println(scan.next());
            }
        } catch (FileNotFoundException f) {
            System.out.println("Usage: java Inventory &lt;path&gt; &lt;filename&gt;");
            System.out.println("The commands file \"" + name + ".cmd\" does not exist.");
        }

    }
}
</code></pre>
