added exit after perror