better error handling (caused by .DS_Store files on a Mac in this case)