Added a test, fixed file adding issue