profiling: move 'fp' closing logic into its own function
We are about to make the logic more robust and reuse it in more place, we start
by isolating what we have.
# See http://EditorConfig.org for the specificationroot = true[*.py]indent_size = 4indent_style = spacetrim_trailing_whitespace = true[*.{c,h}]indent_size = 8indent_style = tabtrim_trailing_whitespace = true