bug fix: hard coded encryption action in write()