Section 6A. At the arraignment of a defendant charged with violating the provisions of sections twenty-seven A, twenty-eight, twenty-nine, one hundred and eleven A and one hundred and thirty-nine of chapter two hundred and sixty-six, the court shall, upon a showing of need by the commonwealth, and after granting adequate time to defense counsel to consult with the defendant, allow testimony from the owner or person in control of such vehicle, solely on the issue of ownership and unauthorized use, and such testimony shall be taken and preserved and shall be admissible at trial.
In the prosecution of a person charged with violating the provisions of sections twenty-seven A, twenty-eight, twenty-eight A, twenty-nine, one hundred and eleven A and one hundred and thirty-nine of chapter two hundred and sixty-six, the court shall order, as a condition of granting a continuance, that the testimony of a witness then present in court be taken and preserved for subsequent use at trial or any other proceeding. The witness shall be examined in open court by the party on whose behalf he is present and the adverse party shall have the right to cross-examination. The expenses of taking and preserving the testimony shall be assessed as costs against the party requesting the continuance.