Added the case in which the sequence does not start from 0, but another file number. Also, added explanation how to call the function.