added the file fetch method in Bayesian Class , and added necessary pre-instructions in the main to call the bayesian.
fixed error of created class instance twice