I'm not sure if this will work properly on Windows since newlines are different.