Any amounts collected from defaulting contractors or their sureties under contracts entered into in connection with river and harbor or flood-control work prosecuted by the Engineer Department, whether collected in cash or by deduction from amounts otherwise due such contractors, hereafter shall be credited in each case to the appropriation under which the contract was made.