add wrapper to allow automatically unboxing file object to fileno