Fix the deprecated file size retrieval.
Fix the deprecated method use.