rtrim set names to remove duplication
logging stuff