try {
                         fileStream = new FileInputStream(fileName);
                         boolean questionnaireNumExists = readLines(fileStream, questionnaireNum);
                    
                         if (!questionnaireNumExists) {
                            
                            dataLine += sQuestionnaireNum; 
                            dataLine += ",";
                         }
                         else System.out.println("The questionnaire number you have entered already exists," +
                                                 " re-enter a number");
                         }
                    catch (Exception e) {
                                         System.err.println(e.toString());
                    }

The compiler skips the try{} and goes directly to the catch{} ... any ideas what might be wrong?

It can't "skip the try". An exception is occurring and you need to figure out what it is. I would recommend putting e.printStackTrace() in your catch block.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.