I'm sorry, I'm not sure I understand.
You said "Thanks it is working"... ok, so far, so good.
But then you said "but I am able to save the code also".
I'm not sure what you mean. Is this a question?
A problem? Are you having some kind of undesireable result?
Is it working and you're good to go, or is there yet more to do?