filename bugfix

Fixed a bug that makes script stop working if the filename is different from index.php