Removed .DS_Store. Added emptyness check for array.