Fix "Undefined variable: file_extension" problem
Merge pull request #29 from mul14/master

Fix "Undefined variable: file_extension" problem