fixed ref for checkfile