CIfo: more safe file opening (wip)