A motion for a change in bail or other conditions of release shall be by written motion, served upon opposing counsel or upon the defendant personally if the defendant is not represented by counsel, within a time reasonable under the circumstances before the hearing on the motion. In granting or denying a motion for a change in bail or other conditions of release, the court shall set forth in writing the reasons for its action.