more reliable way of determining file size