getCoverFile only returns a cover if it already exists, meaning the block of code to write it from the inputstream never executes. If getCoverFile returns null, then use previous behaviour of setting it to cover.jpg so that if the file doesn't exist it's created (cherry picked from commit f0a5557e603e31a53117c40426237d2340142bc2)