Add new function addToFileInJR. Does not change functionality of cmscp.
Merge pull request #4433 from AndresTanasijczuk/addToFileInJR

Add new function addToFileInJR. Does not change functionality of cmscp.