ENH: Added more information when error occurs