writeb works on file