Fix some errors catching, add comments