ignoring files and removing items not needed in directory