added exception incase document doesn't exist