Fabrication and optimization of a sensor array for incipient grain spoilage monitoring