Add tests and handle case where file is moved in
Split tests into separate modules