Investigation of magnetic properties of MgB2 thin films on NbN/Si substrate