Replacing main directory