problem with the scanf with the '[' specifier, figured that one out
debugged the scanf and changed test.txt