remove unnecessary file name while generating a generator