handling exception situation when running on *nix