Fixed check for leftover files