add logger
change output method for aggregated array

Output also empty tag and divide tag and position in separated columns
for each tag
refactorize bash run script