Check file loaded before setting region to prevent warning.