Moved error js into right file