The return code was not propagated through nested subshells in case when files were passed in as arguments.