I don't think that would be a problem. If it happened the way you're telling us, I highly doubt he would take it that far. But then you said you were here for over 20 days... Did that all happen on the same trip? Because that could be a problem... You could go to the Thai Embassy and ask them.
I don't think being in another country than you entered is a problem as long as you have the stamp in your passport. Now if you don't provide other requested documents on time, yes it should be a problem.