added a couple of Exception handling, removed write_publisherID
added a couple of Exception handling, removed write_publisherID, added test for file logging