added a Pre activity. fixed bug: not checking for the existence of a file before opening it.