file open handler