replacing hard coded new-line character with line.separator