fixed cache dir to be created first