Fix the code to handle the change of temporary path

After changing tmp path from /tmp, fab functions had issues, Fixed those issues.