refine calculating file size