Whoever, being a clerk or other officer of a court of the United States, fails to deposit promptly any money belonging in the registry of the court, or paid into court or received by the officers thereof, with the Treasurer or a designated depositary of the United States, in the name and to the credit of such court, or retains or converts to his own use or to the use of another any such money, is guilty of embezzlement and shall be fined under this title or not more than the amount embezzled, whichever is greater, or imprisoned not more than ten years, or both; but if the amount embezzled does not exceed $1,000, he shall be fined under this title or imprisoned not more than one year, or both.
This section shall not prevent the delivery of any such money upon security, according to agreement of parties, under the direction of the court.