Maybe use HadoopFileStatus.isFile?