Improve comments and "log" which resource is being set

Not really logging the resource being set. Instead I'm putting
a counter into the filename that says how many resources have
been set.