trim modules before sending them to log