fixed library import for *nix and issue with arg checking