revert change, need to define SCRIPT_DIR for main.source