added catches and LOG statements to null and closed connections