screenshot taking as bytes and writing as file