Add check for if the work directory exists
Add check for if the work directory exists