Optical losses and gain in silicon-rich silica waveguides containing Er ions