closed File class using a block