in reply to check which files are open to write/read by another process
If both the scripts are run by a common user or if second script is called by root you can see the output of linux command lsof to check the files currently open.