minor changes, file check, error corrections