Fixed generation file bug