Added call to close streams when starting the standalone

Added call to close streams when starting the standalone