Updated file_to_buffer and related functions to accept size_t instead of plain int.