Okay I made a Protected file myself, for testing.
I successfully tested the code after correcting my mistakes.

Check the file in the post #3.