Refactor this callback-based code to use async/await. Keep the behaviour identical, add proper try/catch error handling, and explain any changes in execution order. Code: [paste code]
Convert callbacks to async/await
Modernises callback-based code to promises and async/await.