rewritten to be synchronous, otherwise the next task running on Grunt has not compiled file which it may require