there is something wrong with the way you handle the editing, :wq should not show there in the code , press "Escape key" once you are done editing , and then type
:wq
then hit enter.
what you doing there is adding a line to the code that says :wq and you are not actually saving anything.
also please refer to the complete guide here >
https://bitcointalk.org/index.php?topic=5090664.msg48938476#msg48938476