use try/except for path parsing to prevent weird crashses.