moves splits out filename to new function