Fixed segfualts and runtime errors includeing file input flaw