Created method to add handlers for e.g. logging