Image Capture and Applescript

Hi,
I wrote a script which i tried to attach as Variable to the save in path… value of the action load images in Automator.
I saved my code as application and attached it to Image Capture as plugin. My script works fine in applescript, but does nothing when attached as variable to the Automator action.

on run {input, parameters}
	set folder_nm to my get_nm()
	set pt_combi to ((path to pictures folder as text) & "Check:" & folder_nm as text)
	try
		do shell script "mkdir -p '" & POSIX path of pt_combi & "'"
	end try
	return input
end run
on get_nm()
	set cu_dt to current date
	set {DT, T} to {short date string of cu_dt, text 1 thru 5 of (time string of cu_dt)}
	
	set combi to (my find_rep(DT, ".") & "-" & my find_rep(T, ":") & " Import" as text)
	return combi
end get_nm

on find_rep(DT, sy)
	set tid to text item delimiters
	set text item delimiters to sy
	set DT to text items of DT
	set text item delimiters to ""
	set DT to DT as string
	set text item delimiters to tid
	return DT
end find_rep