add username and write to inputs to function. If write=TRUE insert into database.username required when data are in, and we are running from, a remote host.