open file once to check multiple condition.
improve performance using new version fo csv lib