Fix situation when directory didn't exist