Improve output and shutdown