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