perf: Convert a FILE* instead of a filename