added lastDir in properties, added merge of two images