changed to lib format
all fds are properly created