error handling on first open