Added exception handling and additional info logging