improved tmp file generation and first implementation of offload transformation