Do not dump the temp file on a failed funced

This small change to funced does not delete the temp file unless it sources properly. It will also reuse the same file and therefore not loose edits if the function is re-edited

Fixes #1371