Added handling for errors creating directories