Added logging and verbose options.