Competition between dipolar and exchange interparticle interactions in magnetic nanoparticle films