delete trailing whitespeces
add a method to retrive FilePath object
tweak coding style