added debug log to file;