A possible role of ion demagnetization in substorm generation