Async error handling and MacOS/X fixes