Fix a very critical bug relating to storage of thumbnails in a different directory, which could potentially result in overflowing of S3 storage