Add foreground mode to daemon.
Update README with debug instructions.