print error info when failed to mkdir a directory