Added a check for img folder