Some is printed because the return type of the extension method is an Option, indicating that there might not be a return value. You need to handle this case in your code. What would you like to print if the file doesn't have an extension?
unwrap_or can also be useful in situations like these! Given the to_string_lossy() bit, I think @jethrogb is right, but if that wasn't needed, it would work too.