Make the source file type queryable before calling loop().