Updated to catch exception