Change scope of valfmt to local