Added optional mkdir