Error catching in poscar.py