Added code for creating directory