Add copy function
Move type definitions on top
Add test case for parameters validation
Add check if action dir and result dir are not the same