Due to a mention somewhere I finally figured out how to avoid casting every error type to IoError: Use an enum as return type!