Added logging of document storage errors