fixed csv and txt issues