Made checkpic.py generic