refactor assert file helpers