Added logging and verbose output argument.