Added call to close streams when starting the standalone