Don't try to clean up sfn if it isn't set.

This fixes `manage_file()` being used with the `content` keyword
Merge pull request #14887 from kaithar/feature/add-test-for-source

Don't try to clean up sfn if it isn't set.