Added warning when directory cannot be opened