Add --output option
Added output option, changed log output
Add tests for dry run mode