jewel: split proprietary file handling with common

Change-Id: I9639ed451e70a2244e5824ccb73f4e3a181fb59e