printing error messages instead of throwing exceptions