FileManager: Fix possible NPE

Thanks for the report

Change-Id: Ia877814f738669322b8dc180c5eb349d44dd8d96