adding FAMC and FAMS checking in CMain.java

adding FAMC and FAMS checking in CMain.java