Added support for saving current directory