Add better error reporting to mappers/reducers