add writelog functions, seperate mni refs for epi and t1, more variables for copynii