It looks like the purpose of this block is only to constrain the scope of the *log* function.

I would prefer to avoid creating such a large block for such a limited purpose, especially since it's so easy to overlook the block, given that its contents aren't indented. That makes it dangerous, because another programmer who modifies this later might declare a variable inside the block without noticing the block and then expect it to be available outside of it as well.

Also, the messages being logged already contain sufficient information to identify their source. The first one, `"simulator - LOCKSCREEN ENABLED: "+value`, will result in the message "prosthesis: lockscreen.js - simulator - LOCKSCREEN ENABLED: false", when it would be sufficient to log "prosthesis - lockscreen.enabled: false" or even more simply "lockscreen.enabled: false" to inform a reader about the status of the setting and enable them to find the origin of the log message by grepping the code.

So I would instead declare a debug function in the main shell overlay script that all the code loaded into the script can reference. See also #378 for hints on where we're going with logging in the simulator process (although those changes are out of scope for this pull request).