Removed .DS_Store, and fixed an potential race condition