Effect of side substituents on thermal stability of the modified chitosan and its nanocomposites with magnetite