Throw errors instead of printing error messages