added smart wrapper for C-style FILE pointers