readfile() returns nil,err instead of raising error