Refactored file assertion methods.