load function now handles no file to load