Seperate lines open and read functions