Added buffer allocation error handling.
Fixed seg fault in case of 1 thread and file size bigger than 4GB due toframe_size declared as int instead of long int.
Added comments.
Added compute_block_size().
Finished to comment the code.