Moved bash specific logic to a separate script