Checking for deleted files was not working properly. Only check for deleted files if filename starts with ..