Added ob_start, and more descriptive error