Made err values in done callbacks of type Error