first parameter as cur-file-path & some fixes