Add Wrapper class for callback objects to make sure they are properly closed when no longer needed