adding some debug messages, fixed the new entry_point