Correct error while generate file