Start implementing unittest
Fix error when file is missing
Add more tests (still missing p12n)