added flag to indicate to client to read or write from local filesystem