How to Modify ElasticSearch.yml file in Production

I am installing in Google Compute Engine and i need ElasticSearch to be configured based on the production settings
###################Gateway##################

Allow recovery process after N nodes in a cluster are up:

gateway.recover_after_nodes: 8

and i have changed to 8 previously it was 2 so when i try remove "#" and save the .yml file and I try to restart the ealsticsearch server then it was not working.
My query is that whether the updation is done or I need to remove the #
Please answer
Thanks in advance
Kartheek

It'd help if you formatted that so we could see exactly what you did.