clean input directory and set default loop type