returning error code of script to module