Add createDirectory func