rewrite -- handle "binary" files