Added simple close/read/open code