add option to log to file
improve handling of longest transversal edge

there is no need to remember length and position in an instance
attribute, the ID is completely sufficient (and way more elegant)