changed file open to blocks with new methods