Fix download error/deletion of files in tmp/books