fixed error handling when document convert fails