fix download all documents permission, fix line format indentation