Add awaitTermination call to ensure all threads are complete before shutting down executor