added exception handling to the call to the data logger