factory: update logging.debug in main()
tests: add tests for --show-errors, --user, --port
factory: add --show-errors, --user, --port cli options
tests: fix test_should_communicate_with_stdin()