changed api_ref_call.php to include descriptive error echo