Prettifyed the chdir code