create reg dir
Added support for external files