Issue #15 Fixed library creation if/then to prevent false errors