Added flags to control access as private, public-read, public-write