[FileRepo] Changed "publishBatch" to handle failure better.