Checking file extension before import