fix bug in task loader and allow for variable paths