Check exit code in launchCommand()

 - Check exit code in launchCommand()
 - Fix timeout loop for new exit code checking
 - Misc. logging fixes