compute file length to decide go on or not