fix numPartition parameters= -1 bugs
add back try block of reading from cache