better logs, error handling