added check for file size upon load