added extension parsing for csv and json