This
thread may be some help.
As to when to write your choices.txt is really up to you. I did mine at the end so I can use the source code as a reference to say my algorithm, design approach etc.
Of course I really don't recommend that. As you are doing that particular thing (such as networking) you try it out and happy you document it.