Elimination of problem "This script can only be run in commandline..."