added --output and --watch options