Fixed filename references in error messages
Changed variable names