Edited how echo writes secret key to file