Add separate autoDetect function in readPac.py