stricter error handling