factorize preparation of sikuli script