fixed spatcher check_dir funtion