Fixed intermittent error with returning from function via "return(invisible)". Due to the lack of time for longer investigation, for now, resorted to returning via "stop()", producing an error message. This is OK, as repeated manual calling of the transformation script is not an expected normal behavior.