need to get directory from command line or environment variable in sequence