modified script for relative path