Add errors functionality