Rearrange order of rake task to optimise running time