read,write and command line args