Adding error support