replace conditional with whitespace
handle mkdir error