took care of sprintf, added delimiter as \r\n