added verbose flag for logging