detect if directory exists before setting up workspace