g.part5.addfirstwake function

Adds first wake if it is missing in part 4 output.