Reduce ftell overhead for max_file_size calculation