Add option to specify custom directory.