Improve error message & simplify