Should check if scriptpath is a file