Added some swap utils for writing/reading from internal/external storage