modified php error handling. modified error messages