added automatic filename sanitation