Revamped handling of logging and added warning about skipping IDs.