Fixed execv argument compilation method
Logging should flush messages to file immediately
Changed log variables not to interfere with local variables

Added double underscore prefix to all logging variables so as not to interfere with local scope names.