9.f3 looks weak. Best may by 9.Nc3 to kick back the Queen. If 9...Qh4 (threatening 10...Qxh2 mate), then 10.g3. 11.Kh1 drops the f-pawn. Perhaps 11.c3 and if 11...Qd3, then 12.Qc2 and trade queens. After 11.Kh1, Black can play 11...Bxf4. After 11...Bc5, 12.d3 and 13.c3 looks best. 13.Nc3 loses the f-pawn again. 13.Qf3 holds the pawn. After 13.Nc3, Black could play 13...Qxf4. After 13.Nh5?? White should win after 13...Qxh5. Now 14.b3 allows Black to take the pawn and eventually win the game.
Did you know that White can't win a pawn on move 5? Well, now you do!
Focus on piece play instead of moving your pawns out, just as Bill comments on 9 f3.
Also, the flank development of the QB is generally bad whenever you play 1 e4. It is too slow and omits the all-important d4, and then even if you do achieve d4 your bishop is blocked!
Anyway, how to avoid checkmate? Don't move the knight!