Another set of eyes

Original code used fwrite instead of putc.
What is expected is that the destination file will be written to. Instead I end up with a zero length file. I'm sure there is something simple I'm missing.
tia.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>


int main(int argc, char **argv) {
int x = 0, freq = 0, cnt = 0;
FILE *fpt, *wpt;
char comment_block[2];
char bin;

                                
                                if (argc != 5) {printf("Error: Please provide\n 1.) Source filename\n 2.) Destination filename\n 3.) Frequency for commitment\n 4.) Message to embed\n as arguments to %s.\n",argv[0]); exit(0);}
                                if ( (fpt = fopen(argv[1],"r")) == NULL || (wpt = fopen(argv[2],"a+")) == NULL) {printf("Error opening source or destination files.\n"); exit(0);}
                                freq = atoi(argv[3]);
                                
                                while (fread(&comment_block,sizeof(comment_block),2,fpt) > 0) {
                                      printf("At byte %d.\n",(x += 2));
                                      if ((comment_block[0] & 0xFF) && (comment_block[1] & 0xD8)) {printf("Start of image found due to comment_block[0]: %p = %x and comment_block[1]: %p = %x\n",&comment_block[0],comment_block[0],&comment_block[1], comment_block[1]); x = 0; putc(comment_block[0],wpt); putc(comment_block[1],wpt); break;}
                                      putc(comment_block[0],wpt); putc(comment_block[1],wpt);
                                }
                                
 
                                while (fread(&bin,sizeof(bin),1,fpt) > 0) {
                                      printf("Integer value for %p at character count %d = %x.\n",&bin,(x++),bin);
                                      if (x > 1 && x % freq  == 0 && cnt <= strlen(argv[4])) {bin = argv[4][cnt++]; printf("At character count: %d replacing to %x.\n",x,bin);}
                                      putc(bin,wpt);
                               }
                               fclose(fpt); fclose(wpt);
                               return 0;
}

Is there something in the source file or is it empty.

Also - ran your code on a binary file - generated output. I agree with Shamrock.

Please make sure the disk have space and you have the permission to write on the disk.

Bizarre. This is definitely a single machine malf; nothing so obvious as diskspace or permissions. I'll have to do more work to find out what is wrong. Thanks for the feedback.

I found an error on your code, not sure if it is the only one.

while (fread(&comment_block,sizeof(comment_block),2,fpt) > 0) {

from the manual:

The function fread() reads nmemb elements of data, each size bytes long, from the stream pointed to by stream, storing them at the location given by ptr.

So what you're doing is reading 2 elements of data from fpt, BOTH with size sizeof(comment_block) thus overflowing your buffer.
What you should be doing is,

fread(&comment_block, sizeof(comment_block)/2, 2, fpt) > 0)

That's right. The correct fix is just to use sizeof(char).