Removed all scandir/is_file from definitions.php