Fixing error where filepicker prompt never closes

Added boolean for case where file is empty.