creates missing directories update and scratch