updated write command - detect source directory