spacing in missing legend image
refactoring
improved logging