check filetype before upload