Solved the problem of finding filetype from extension.