Section 34. If it appears that the claimant holds a valid assignment from the principal defendant only as security for a debt, the court shall, at the request of the plaintiff, ascertain and determine the amount due upon such debt at the time of service upon the trustee, and the claimant shall have judgment and execution for the amount so found to be due him and for his costs; and after said judgment and execution have been satisfied, the residue, if any, of the goods, effects or credits in the hands of the trustee shall be subject to the attachment in the trustee process. If judgment by default has been rendered against the trustee and it appears that he has paid over, upon execution issued on the original judgment, any part of the goods, effects or credits in his hands liable to attachment, he shall be liable to the adverse claimant only for the residue in his hands.