added control on filename