fixed check-version for empty directory
fixed check-version for empty directory