...
//add the resource file and load it into a buffer
add_resource( wrsFile );
add_buffer( wrsName, wrsFile, fileSize );
// vvvvvvvvv
// I am unclear if your coursename string needs to be *.txt, *.pak, or *.txt.pak
//but I think *.pak INSTEAD of *.txt is the most likely (actual filename stays txt)
long size; void* pCourse = file_load( coursename ,NULL,&size);
add_buffer( coursename ,pCourse,size);
// ^^^^^^^^^
if( file_cpy(courseName,pakName) != 0 )
...