added error logging to find the problem