No officer, receiving money under execution, when the person to whom it is payable resides in a different county from that in which the officer resides, shall be liable to have any judgment rendered against him or his sureties for the nonpayment thereof, until a demand of payment be made of such officer in his county by such creditor or his attorney at law, or some person having a written order from the creditor.