Fixed fileparts bug