When the marshal levies upon personal property by virtue of an execution, he may permit the judgment debtor to retain the same or any part thereof in his possession until the day of sale upon the defendant executing a written undertaking to the marshal with sufficient surety in double the value of such property to the effect that it shall be delivered to the marshal at the time and place of sale. For nondelivery of the property, the marshal or the judgment creditor may enforce the liability of the judgment debtor and sureties on the undertaking by motion as provided in section 176 of this title, but the marshal shall not thereby be discharged from his liability to the plaintiff for such property.