HCSVLAB-645: Refactors file size checks to simplify code