Added file check to icon changing.