Update directory changes, and make sure writing to log works even when in an arbitrary directory