Modified max execution time inside sync function; removed some debug code.