How to work with actions on files