Fixed missing check for existing file in activities