Prepare to handle errors properly