before implementation of catching scan errors