Added logging and common CLI app support.