proper handling of error & recovery