More Error handling modifications