Added space check to workdir