Added meaningful error messages