Use return value to speed up force saving files

The variable assignment was lost during refactoring.

Found with Coverity (CID 1238689).