Green function method in the theory of ferromagnetic thin film