You need to changes this to use Properties.store, that way you won't worry about new line feeds and white spaces