Cleaned up before using async/await.