Improved logging. Added quiet mode.