Fixed txtFolder/matFolder bug