Looks OK to move the time call. Put the debug message back.