Added error check for sourcing libraries to all scripts