Fix error the backup and link creation

Create the function check_and_create for the backup and link creation
checking the file type for the interative and not operation