null handling and loading from file/url