detect file by ext
detect file by ext