Replace System.lineSeparator() by System.getProperty("line.separator")