Readfile rewrite