Added comments and pass on some errors instead of printing.