Add params file. Rationalise console logging. Split run_attempt() into separate function