modified open in sublime function