Using nonlinear optical properties in conjunction with chemical synthesis to understand defects in self-assembled molecular films