Improved error messages for incorrect arguments