Add better error logging to scheduling helpers, multiple bugfixes