Fix function to get file size.