fixed erorrs. added error if main not found. ready to start generating real tm files