Effects of Ti doping on the structures and magnetic properties of films