Added logging and licensing code