altered position of PIL import to avoid bootloop if not installed