modify write.con in server.R