It works with s.append("\n"); no problem.
Also when I try to read the file as santa01 suggested there is something wierd happening. When function gets vertex shader it reads through it and exits just before
theColor = inColor; }
and when it reads through fragment shader it read the file entirely and adds some garbage characters at the end (when debugging).
I never used this approach so I might be missing something.