File affidavits on MST: HC tells state, Railways