save only files of same type, remove errors of files of same type