Generating function of point transformation

I am asked to show that the generating function corresponding to a point transformation in Lagrangian mechanics can be taken as null.

The point transformation consists of
$$Q_i=Q_i(q,t),$$ and since the new generalized momenta must transform according to Lagrangian mechanics we impose \begin{equation} p_i(Q,P,t)=\dfrac{\partial L}{\partial \dot{q}_i}=\sum_{j=1}^{n} \dfrac{\partial L'}{\partial \dot{Q}_j}\dfrac{\partial \dot{Q}_j}{\partial \dot{q}_i}=\sum_{j=1}^{n} P_j\dfrac{\partial \dot{Q}_j}{\partial \dot{q}_i}=\sum_{j=1}^{n}P_j\dfrac{\partial Q_j}{\partial q_i}\, , \end{equation} where $L'$ is the transformed Lagrangian.

Now we know that the following expression must be satisfied so the transformation is canonical: $$\sum_i p_i\dot{q}_i -H-\left(\sum_i P_i\dot{Q}_i-K \right)=\dfrac{dF}{dt} \, ,$$ where $F$ is called the generating function of the transformation, and $K$ is the new Hamiltonian.

My procedure (which I'm not very sure about) was to take $F_2(q,P,t)=F+\sum_i P_iQ_i$, in which case it can be deduced that $$\dfrac{\partial F_2}{\partial q_i}=p_i\, , \: \: \: \: \dfrac{\partial F_2}{\partial P_i}=Q_i\, , \: \: \: \: K=H+\dfrac{\partial F_2}{\partial t}\, .$$

We arrive at: $$p_i=\sum_{j}P_j\dfrac{\partial Q_j}{\partial q_i}=\dfrac{\partial F_2}{\partial q_i}=\dfrac{\partial F}{\partial q_i}+\sum_j P_j\dfrac{\partial Q_j}{\partial q_i} \Rightarrow F \neq F(q) \, .$$

Using the middle equation we get similarly: $$\dfrac{\partial F}{\partial P_i}=0 \Rightarrow F \neq F(P)\, .$$

Assuming that the transformation does not depend explicitly on $t$ we finally deduce F is a constant, so it can be zero.

Is the procedure above correct? Should I do the same for the possible partial derivatives of $F$ wrt $p$ and $Q$ (using $F_3=F_3(p,Q,t)$), so it is eventually shown that F does not need to depend on any canonical coordinate or momentum and thus can be identified as zero?