Making async functions blocking