fixed condition for recognising csv