Catch exception for wrong path