Fix the check if a file extension is used
Merge pull request #379 from m7moud/master

Fix the check if a file extension is used