I'd rather leave the responsibility with the caller to ensure that "$file" exists, otherwise we could sweep issues under the carpet.