escape \n correctly