catch error from mkdir