get the file length instead of guess