Fix colour scaling and make logfile names dynamic