Add a debug mode for the server so it can be run in the foreground still. Resolves #35