try to find another filename if the current filename already exists