Remove useless import, change open file semantics