Section 3. They shall keep a record of all money or other property found in possession of prisoners committed to such institutions, and shall be responsible to the commonwealth for the safe keeping and delivery of said property to said prisoners or their order on their discharge or at any time before. The superintendents of correctional institutions of the commonwealth and the superintendents and keepers of jails, houses of correction and of all other penal or reformatory institutions shall, upon receipt of an outstanding victim and witness assessment, transmit to the court any part or all of the monies earned or received by any inmate and held by the correctional facility, except monies derived from interest earned upon said deposits and revenues generated by the sale or purchase of goods or services to persons in correctional facilities, to satisfy the victim witness assessment ordered by a court pursuant to section eight of chapter two hundred and fifty-eight B. Any monies derived from interest earned upon the deposit of such money and revenue generated by the sale or purchase of goods or services to persons in the correctional facilities may be expended for the general welfare of all the inmates at the discretion of the superintendent.