Added file details, updated tests and fixed bug.