Wrong regexp assuming only txt files fixed