Improved shutdown process by splitting it to stopped / awaitTermination