Make file task more flexible