added ability to write public files
added public file writing to chat app