Cleaned up try/catch block