You should chomp() everything you get from <stdin> to remove trailing <CR><NL>
"Adding error messages later" is not a good idea when opening files, directories etc, because the operations
will then fail silently - and you'll never know that something is wrong, or what. You should therefore always