refactored createReadStream
refactored writeFile using store#set
append-mode for write-file