added support for run.sh and memlib