Added logCommandOutputOnError() function.

Logs a commands output in case it terminated with a non-zero exit value.