Magnetic switching of a single molecular magnet due to spin-polarized current