debugged populateMultiTiff.m