it's better to echo the error message and return and exit with a valid exit code : 

```php
    echo "Failed to build less files\n";
    exit(1);
```