File and comment related errors now handled better