exception handling for init