Moved script addition to profile script into a conditional block