writing signature file in binary format