Changed detectenvironment closure to look for local string in environment.php to run debug in local only