fixed incorrect check for folder creation