Factors affecting academic failure in medical students in Iran