be friendly with 'bash -e' and correct about exit status