Modified NBClassifiers.hs to allow error handling