Handle OSError when creating new dir