ajax return is null

ajax return is null

I'm trying to get back confirmation that a file has been written to using php.  Here's a php code snippet:

  1. // Check that write has been successful
  2.   if ($fwrite !== false) {
  3.     $output = json_encode(array( // create JSON data
  4.       'type'=>'success', 
  5.       'text' => 'Congratulations !  The key has been successfully created.'
  6.     ));
  7.     return ($output);
  8.     die($output); // exit script outputting son data
  9.   }

This is my ajax sending stuff:
  1. // upload text to file
  2.   $.ajax({
  3.     method: 'POST',
  4.     dataType: 'json',
  5.     processData: false,
  6.     contentType: false,
  7.     url: 'assetpath/easydbkeysetup.php',
  8.     data: textData  // this is FormData()
  9.   })
  10.   .done (function(response) {
  11.       var rout = response.text;  // THROWING ERROR: NULL IS NOT AN OBJECT
  12.       console.log('Response-Done: ' + rout);
  13.       $('#easydbcredentialswrapper_%id% .success-message p').append('<span>' + rout + '</span>');
  14.   })
  15.   .fail (function(response) {
  16.       var rout = response.text;
  17.       $('#easydbcredentialswrapper_%id% .error-message p').append('<span>' + rout + '</span>'); 
  18.   });


Why can't I get the response.text ?