what the heck was that 'f"${v}%03d"' thing?

Didn't mean to make you gag. It's string interpolation. Works in Scala 2.10.

"%03d".format(v) is the better way to go. Works in older version of Scala. Doesn't invoke the gag reflex.