added subdir
added delay option