cleaning up directories. error on line 363 in api index.php