remove file
implementing different states and actions