fixes a os related bug. now it uses the line separator value instead of just \n